package pe.gob.onpe.facade.remote;

import java.util.List;
import javax.ejb.Remote;

import pe.gob.onpe.ejb.Ubigeo;


/**
 * Remote interface for UbigeoFacade.
 * 
 * @author MyEclipse Persistence Tools
 */
@Remote
public interface UbigeoFacadeRemote {
	/**
	 * Perform an initial save of a previously unsaved Ubigeo entity. All
	 * subsequent persist actions of this entity should use the #update()
	 * method.
	 * 
	 * @param entity
	 *            Ubigeo entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(Ubigeo entity);

	/**
	 * Delete a persistent Ubigeo entity.
	 * 
	 * @param entity
	 *            Ubigeo entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(Ubigeo entity);

	/**
	 * Persist a previously saved Ubigeo entity and return it or a copy of it to
	 * the sender. A copy of the Ubigeo entity parameter is returned when the
	 * JPA persistence mechanism has not previously been tracking the updated
	 * entity.
	 * 
	 * @param entity
	 *            Ubigeo entity to update
	 * @returns Ubigeo the persisted Ubigeo entity instance, may not be the same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public Ubigeo update(Ubigeo entity);

	public Ubigeo findById(String id);

	/**
	 * Find all Ubigeo entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the Ubigeo property to query
	 * @param value
	 *            the property value to match
	 * @param rowStartIdxAndCount
	 *            Optional int varargs. rowStartIdxAndCount[0] specifies the the
	 *            row index in the query result-set to begin collecting the
	 *            results. rowStartIdxAndCount[1] specifies the the maximum
	 *            count of results to return.
	 * @return List<Ubigeo> found by query
	 */
	public List<Ubigeo> findByProperty(String propertyName, Object value,
			int... rowStartIdxAndCount);

	public List<Ubigeo> findByDescripcion(Object descripcion,
			int... rowStartIdxAndCount);

	/**
	 * Find all Ubigeo entities.
	 * 
	 * @param rowStartIdxAndCount
	 *            Optional int varargs. rowStartIdxAndCount[0] specifies the the
	 *            row index in the query result-set to begin collecting the
	 *            results. rowStartIdxAndCount[1] specifies the the maximum
	 *            count of results to return.
	 * @return List<Ubigeo> all Ubigeo entities
	 */
	public List<Ubigeo> findAll(int... rowStartIdxAndCount);
}